# coding:UTF-8
# ________________________
# Project_Name:pyzidonghua
# File_Name:Administrator
# Author:Administrator
# Date_Time:2022/4/25 11:01
# Description:
# ________________________
import unittest
import HTMLTestRunner

# 运行文件
# 批量扫描文件夹添加，生成HTML测试报告

# 1.生成测试套件，添加测试用例类
#绝对路径
# suite = unittest.defaultTestLoader.discover(r'C:\PycharmProjects\pythonProject\pyzidonghua\selenium_4', pattern='*.py')
#相对路径
suite = unittest.defaultTestLoader.discover(r'../Project_practice/case', pattern='*.py')
# 2.生成运行器
file = open('./test_result.html', mode='wb')
runner = HTMLTestRunner.HTMLTestRunner(file, title='智慧云猎聘系统', description='测试人员：何邻平')

# 3.运行测试套件
runner.run(suite)

# 4.关闭文件
file.close()
